import request from '@/router/axios'

export function fetchUnqualifiedList(query) {
  return request({
    url: '/eims/unqualified/page',
    method: 'get',
    params: query
  })
}

export function addUnqualifiedObj(obj) {
  return request({
    url: '/eims/unqualified',
    method: 'post',
    data: obj
  })
}

export function getUnqualifiedById(id) {
  return request({
    url: '/eims/unqualified/' + id,
    method: 'get'
  })
}

export function delUnqualifiedObj(id) {
  return request({
    url: '/eims/unqualified/' + id,
    method: 'delete'
  })
}
//更新
export function editUnqualifiedObj(obj) {
  return request({
    url: '/eims/unqualified',
    method: 'put',
    data: obj
  })
}
//处理
export function handleUnqualifiedObj(obj) {
  return request({
    url: '/eims/unqualified/handleUnqualified',
    method: 'put',
    data: obj
  })
}


//统计不合格商品数量
export function getUnqualifiedGoodsNumberSum(obj) {
  return request({
    url: '/eims/unqualified/getUnqualifiedGoodsNumberSum',
    method: 'post',
    data: obj
  })
}